<template>
  <div class="list">
    <ScrollList :disabled="disabled" :empty="false" @change="load"
      ><template #header>
        <ul class="demo">
          <li v-for="(item, index) in policylist" :key="index">
            {{ index + 1 }}
          </li>
        </ul>
      </template></ScrollList
    >
  </div>
</template>
<script setup>
import { ref, computed } from 'vue'
import { ScrollList } from '@/components'
//企业可申报政策nav
let policyArr = ref([])
let count = ref(1)
const disabled = ref(false)
const pageSize = ref(10)
const load = () => {
  disabled.value = true
  fetchHomedeclareListaync()
}
const policylist = ref([])
const fetchHomedeclareListaync = () => {
  count.value += 1
  policylist.value.push(count)
  if (count.value == 20) {
    disabled.value = true
    return false
  }
  disabled.value = false
}
</script>
<style scoped>
.list {
  height: 300px;
  overflow: hidden;
}
.demo li {
  width: 100%;
  height: 40px;
  line-height: 40px;
  border-bottom: 1px solid #e9eeff;
}
</style>
